/PROG  PNS0012
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "P0246515";
PROG_SIZE	= 3357;
CREATE		= DATE 22-08-23  TIME 09:20:14;
MODIFIED	= DATE 25-04-29  TIME 17:22:44;
FILE_NAME	= PNS0072;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3813;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSH ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0072 ;
   7:  !  PART:P0203032    ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  OVERRIDE=20% ;
  12:  MOVE TO HOME    ;
  13:  R[14]=75    ;
  14:  R[18]=1    ;
  15:  R[19]=.2    ;
  16:   ;
  17:  !------------------------------- ;
  18:  !BEGINNING OF PROGRAM ;
  19:  CALL PARTDROP    ;
  20:  COL GUARD ADJUST R[14] ;
  21:  UTOOL_NUM=1 ;
  22:  UFRAME_NUM=0 ;
  23:  PAYLOAD[3] ;
  24:   ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[6] 50% CNT100 ACC10    ;
  28:  PAUSE ;
  29:  R[1]=0    ;
  30:  TIMER[1]=RESET ;
  31:  TIMER[1]=START ;
  32:   ;
  33:  LBL[10:TOP OF LOOF] ;
  34:  OVERRIDE=R[5] ;
  35:   ;
  36:  TIMER[3]=STOP ;
  37:  TIMER[2]=STOP ;
  38:  R[1]=R[1]+1    ;
  39:  R[2]=TIMER[2]    ;
  40:  R[3]=60/R[2]    ;
  41:  R[8]=TIMER[3]    ;
  42:  TIMER[2]=RESET ;
  43:  TIMER[2]=START ;
  44:  TIMER[3]=RESET ;
  45:   ;
  46:   ;
  47:  !PROCEED TO PICK ;
  48:  LBL[20] ;
  49:  IF DI[1]=ON AND DI[3]=ON AND DI[8]=ON,JMP LBL[25] ;
  50:  IF DI[29]=ON,JMP LBL[90] ;
  51:  JMP LBL[20] ;
  52:  LBL[25] ;
  53:  WAIT DI[1]=ON AND DI[3]=ON AND DI[8]=ON    ;
  54:   ;
  55:  TIMER[3]=START ;
  56:  OVERRIDE=R[5] ;
  57:J P[3:PICK APPROACH] 100% CNT60 ACC100    ;
  58:   ;
  59:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:  PAYLOAD[4] ;
  61:  CALL CHK_PICK    ;
  62:  MONITOR Z_CHECH ;
  63:J P[5:PICK DEPART] 100% CNT60 ACC100 TA R[20]sec,DO[5]=PULSE,1.0sec    ;
  64:  DO[8]=PULSE,1.0sec ;
  65:  LBL[27] ;
  66:  IF DI[9]=OFF OR DI[11]=OFF,JMP LBL[27] ;
  67:   ;
  68:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  69:   ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  72:  TIMER[3]=STOP ;
  73:  LBL[40:AT DROP POUNCE] ;
  74:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  75:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  76:  IF DI[18]=ON,JMP LBL[60] ;
  77:  JMP LBL[40] ;
  78:   ;
  79:  LBL[50:MOVE DROP SNEAK] ;
  80:  TIMER[3]=START ;
  81:  OVERRIDE=R[5] ;
  82:J P[9:DROP SNEAK] 100% CNT100 ACC110 BREAK    ;
  83:  LBL[51:DROP OR C-P-S] ;
  84:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  85:  IF DI[18]=ON,JMP LBL[40] ;
  86:  JMP LBL[51] ;
  87:  JMP LBL[50] ;
  88:   ;
  89:  LBL[60:MOVE CLS-PRS-ACC] ;
  90:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  91:  PAUSE ;
  92:  JMP LBL[30] ;
  93:   ;
  94:  LBL[80:DROP ENABLED] ;
  95:  !PROCEED TO DROP ;
  96:  TIMER[3]=START ;
  97:  OVERRIDE=R[5] ;
  98:J P[10:DROP APPROACH] 100% CNT60 ACC110    ;
  99:  MONITOR END Z_CHECH ;
 100:J P[11:DROP] 100% CNT10 TB R[19]sec,CALL PARTDROP ACC110    ;
 101:  PAYLOAD[3] ;
 102:  CALL CHK_DROP    ;
 103:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 104:  DO[6]=PULSE,1.0sec ;
 105:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 106:   ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 10% CNT100 ACC100 BREAK    ;
 109:  IF DI[26]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1111.822  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.337  mm,	Y =  1576.000  mm,	Z = -1100.000  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.804 deg,
	E1=   134.033 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2605.073  mm,	Y =  3245.173  mm,	Z =  -989.102  mm,
	W =   179.497 deg,	P =     -.640 deg,	R =    89.769 deg,
	E1=   194.637 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2605.074  mm,	Y =  3245.173  mm,	Z = -1139.181  mm,
	W =   179.912 deg,	P =      .580 deg,	R =    89.772 deg,
	E1=   194.637 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2605.073  mm,	Y =  3245.173  mm,	Z =  -900.621  mm,
	W =   179.497 deg,	P =     -.640 deg,	R =    89.769 deg,
	E1=   194.637 deg
};
P[6]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2072.337  mm,	Y =  1576.000  mm,	Z = -1017.920  mm,
	W =   179.322 deg,	P =     1.370 deg,	R =   150.804 deg,
	E1=   134.033 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2135.932  mm,	Y =  1723.091  mm,	Z =  -916.184  mm,
	W =   179.319 deg,	P =      .206 deg,	R =   141.182 deg,
	E1=   144.610 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2032.181  mm,	Y = -1082.102  mm,	Z =  -918.951  mm,
	W =  -177.788 deg,	P =    -4.402 deg,	R =  -156.367 deg,
	E1=    82.059 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2271.820  mm,	Y = -2346.421  mm,	Z =  -963.904  mm,
	W =  -179.473 deg,	P =    -4.303 deg,	R =  -124.239 deg,
	E1=    49.378 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2601.791  mm,	Y = -3230.923  mm,	Z =  -897.286  mm,
	W =   178.934 deg,	P =    -3.577 deg,	R =   -89.551 deg,
	E1=    13.979 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2601.789  mm,	Y = -3230.923  mm,	Z = -1106.887  mm,
	W =   178.934 deg,	P =    -3.577 deg,	R =   -89.551 deg,
	E1=    13.979 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2601.792  mm,	Y = -3230.922  mm,	Z =  -978.407  mm,
	W =   178.934 deg,	P =    -3.577 deg,	R =   -89.551 deg,
	E1=    13.979 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2139.146  mm,	Y = -1320.254  mm,	Z = -1023.644  mm,
	W =  -179.275 deg,	P =      .526 deg,	R =  -148.265 deg,
	E1=    73.640 deg
};
/END
